-- GENERATED SPELL FOR [Twilight Guardian] --


function spell0_33822(pUnit, Event) --@Concussion Blow,n/a--
pUnit:FullCastSpellOnTarget(52719,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33822', 3283, 1)
end

function spell1_33822(pUnit, Event) --@Devastate,n/a--
pUnit:FullCastSpellOnTarget(62317,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33822', 584, 1)
end

function spell2_33822(pUnit, Event) --@Thunderclap,n/a--
pUnit:FullCastSpellOnTarget(63757,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33822', 15335, 1)
end

function Sorts_33822(pUnit, Event)
local choix_sorts_33822 = math.random(0, 2)
if choix_sorts_33822 == 0 then
pUnit:RegisterEvent('spell0_33822', 1, 1)
end
if choix_sorts_33822 == 1 then
pUnit:RegisterEvent('spell1_33822', 1, 1)
end
if choix_sorts_33822 == 2 then
pUnit:RegisterEvent('spell2_33822', 1, 1)
end
end

function mob33822_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33822', math.random(1500, 3000), 1)
end

function mob33822_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33822_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33822_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33822, 1, 'mob33822_Action')
RegisterUnitEvent(33822, 2, 'mob33822_Leave')
RegisterUnitEvent(33822, 3, 'mob33822_Kill')
RegisterUnitEvent(33822, 4, 'mob33822_Die')
